package com.wanmait.houlang.controller;

import com.wanmait.houlang.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class ErrorController {

    @RequestMapping(value = "/404")
    public Result error404(HttpServletRequest request) {
        return Result.error("页面不存在");
    }

    @RequestMapping(value = "/500")
    public Result error500(HttpServletRequest request) {
        return Result.error("服务器内部错误");
    }
}